Login and get codingUp to this point anyone can modify food entries in the food log API, for any user!
That is not desired and in this Bite we will have you lock down the API.
You'll work through the OAuth2 with Password (and hashing), Bearer with JWT tokens guide adding all the pieces to effectively make the API secure using using JWT tokens and secure password hashing. You'll use FastAPI's elegant
Depends()
to lock down the endpoints that were copied over from a previous Bite.Good luck!
This Bite concludes the FastAPI learning path. Stay tuned for an SQLModel learning path where we build a similar API but using an ORM / database for persistence.
If you have any feedback on this learning path use the feedback form upon completing any of the Bites or hit us up directly on Slack.
61 out of 68 users completed this Bite.
Will you be the 62nd person to crack this Bite?
Resolution time: ~91 min. (avg. submissions of 5-240 min.)